# -*- encoding=utf8 -*-
__author__ = "taozhen"

from airtest.core.api import *

auto_setup(__file__)


start_app("com.rongyi.launcher")
wait(Template(r"tpl1587968613929.png", record_pos=(-0.08, 0.022), resolution=(1080, 1920)))
touch(Template(r"tpl1587968624073.png", record_pos=(-0.089, 0.024), resolution=(1080, 1920)))
touch(Template(r"tpl1587968660243.png", record_pos=(0.078, 0.157), resolution=(1080, 1920)))
# time.sleep(60)

assert_exists(Template(r"tpl1588217458536.png", record_pos=(-0.01, -0.053), resolution=(1080, 1920)), "判断是否存在正在打包的图案和文字")


# while True:
# try 
# except Exception as e:
    
wait(Template(r"tpl1588216730086.png", record_pos=(0.356, 0.077), resolution=(1080, 1920)),timeout=180)
touch(Template(r"tpl1587968872864.png", record_pos=(0.361, 0.076), resolution=(1080, 1920)))

wait(Template(r"tpl1588217946022.png", record_pos=(-0.003, -0.808), resolution=(1080, 1920)),timeout=10)

assert_exists(Template(r"tpl1588217724067.png", record_pos=(0.003, -0.805), resolution=(1080, 1920)), "判断是否加载模板成功")  # 是否存在百度，证明一个demo完成






